1 name: Hugo Build and Deploy
10 uses: actions/checkout@v2
15 # https://github.com/marketplace/actions/github-pages-action
17 uses: peaceiris/actions-hugo@v2
19 hugo-version: '0.88.1'
22 - name: Build for fascode.net
23 run: bash ./update-blog.sh
24 #run: hugo --minify -D
26 - name: Deploy for fascode.net
27 uses: peaceiris/actions-gh-pages@v3
29 github_token: ${{ secrets.GITHUB_TOKEN }}
30 publish_branch: public
33 - name: Build for GitHub Pages
34 run: bash ./update-blog.sh --baseURL https://hayao0819.github.io/hayao.fascode.net/blog/
35 #run: hugo --minify -D
37 - name: Deploy for GitHub Pages
38 uses: peaceiris/actions-gh-pages@v3
40 github_token: ${{ secrets.GITHUB_TOKEN }}
41 publish_branch: gh-pages
45 runs-on: ubuntu-latest
48 uses: actions/checkout@v2
53 - name: Setup git repogitories
55 GH_PAGES_REPO_DEPLOY_KEY: ${{ secrets.GH_PAGES_REPO_DEPLOY_KEY }}
57 echo "$GH_PAGES_REPO_DEPLOY_KEY" > ~/deploy_key.pem
58 chmod 600 ~/deploy_key.pem
59 git config --global user.email "hayao@fascode.net"
60 git config --global user.name "hayao"
61 git config remote.origin.url "git@github.com:Hayao0819/hayao0819.github.io.git"
66 GIT_SSH_COMMAND: ssh -i ~/deploy_key.pem -o StrictHostKeyChecking=no -F /dev/null
69 if ! git diff --cached --quiet; then
70 git commit -m "Deploy $GITHUB_SHA by GitHub Actions"
71 git pull origin master
72 git push origin master