有沒有免費的網(wǎng)站軟件3步打造seo推廣方案
感謝@粉皮zu的私信,又有素材寫筆記了。(●’?’●)
剛好記錄一下我示例代碼的GitHub部署配置,以便于后期追加倉庫。
效果
環(huán)境
- git
- win
步驟
第一步 新建倉庫
第二步 拉取代碼
將倉庫clone到本地
git clone 地址
第三步 部署文件
新建.github\workflows\static.yml
文件
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pageson:# Runs on pushes targeting the default branchpush:branches: ["main"]# Allows you to run this workflow manually from the Actions tabworkflow_dispatch:# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:contents: readpages: writeid-token: write# Allow one concurrent deployment
concurrency:group: "pages"cancel-in-progress: truejobs:# Single deploy job since we're just deployingdeploy:environment:name: github-pagesurl: ${{ steps.deployment.outputs.page_url }}runs-on: ubuntu-lateststeps:- name: Checkoutuses: actions/checkout@v3- name: Setup Pagesuses: actions/configure-pages@v2- name: Upload artifactuses: actions/upload-pages-artifact@v1with:# Upload entire repositorypath: '.'- name: Deploy to GitHub Pagesid: deploymentuses: actions/deploy-pages@v1
第四步 將寫好的代碼復制到根目錄下
目錄結構例如
運行測試這里推薦使用Visual Studio Code + Live Server測試代碼很方便。
第五步 提交代碼
git add .
git commit -m '第一次提交'
git push
然后就會發(fā)現(xiàn)部署失敗了😅
第六步 設置倉庫
然后將Action中錯誤的流水線重新運行
然后就就就…可以了…哈哈哈哈
成功之后這里會出現(xiàn)在線地址
地址
倉庫 https://github.com/ToMeShare/H5.Examples
在線 https://tomeshare.github.io/H5.Examples/