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
44 - name: Setup git repogitories
46 GH_PAGES_REPO_DEPLOY_KEY: ${{ secrets.GH_PAGES_REPO_DEPLOY_KEY }}
48 echo "$GH_PAGES_REPO_DEPLOY_KEY" > ~/deploy_key.pem
49 chmod 600 ~/deploy_key.pem
50 git config --global user.email "hayao@fascode.net"
51 git config --global user.name "hayao"
52 git config remote.origin.url "git@github.com:Hayao0819/hayao0819.github.io.git"
57 GIT_SSH_COMMAND: ssh -i ~/deploy_key.pem -o StrictHostKeyChecking=no -F /dev/null
60 if ! git diff --cached --quiet; then
61 git commit -m "Deploy $GITHUB_SHA by GitHub Actions"
62 git pull origin master
63 git push origin master