name: Publish Site on: push: branches: - master paths-ignore: - '.github' - 'README.md' - 'LICENSE' jobs: build-deploy: runs-on: ubuntu-20.04 if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" steps: - uses: actions/checkout@v2 with: submodules: true fetch-depth: 0 # - uses: actions/setup-node@v2 # - run: npx markdownlint-cli . - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: hugo-version: 0.94.0 extended: true - name: Build `mtf.wiki` run: hugo --minify --enableGitInfo - name: Deploy `mtf.wiki` uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/master' with: deploy_key: ${{ secrets.DEPLOY_KEY }} publish_branch: master publish_dir: ./public cname: mtf.wiki external_repository: mtf-wiki/mtf-wiki.github.io force_orphan: true - name: Build `mtfwiki.com` run: hugo --minify --enableGitInfo --baseURL https://mtfwiki.com - name: Deploy `mtfwiki.com` uses: reggionick/s3-deploy@v3 if: github.ref == 'refs/heads/master' with: folder: ./public bucket: mtfwiki.com bucket-region: ${{ secrets.S3_BUCKET_REGION }} delete-removed: true private: true env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}