name: build on: # Run the build for pushes and pull requests targeting master push: branches: - master pull_request: branches: - master # Used to trigger the build for Anchor feed updates. Can by kicked off via: # curl -X POST -H "Authorization: token $GH_PAT" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/Einundzwanzig-Podcast/einundzwanzig.space/dispatches --data '{"event_type": "build_docs"}' repository_dispatch: types: - anchor_update jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [14] steps: - name: Checkout uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - name: Install run: npm ci - name: Build run: npm run prod - name: Predeploy if: success() && github.ref == 'refs/heads/master' run: | # https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/ touch dist/.nojekyll # https://help.github.com/en/articles/managing-a-custom-domain-for-your-github-pages-site echo einundzwanzig.space > dist/CNAME - name: Deploy if: success() && github.ref == 'refs/heads/master' uses: maxheld83/ghpages@v0.3.0 env: BUILD_DIR: dist/ GH_PAT: ${{ secrets.GH_PAT }}