name: Deploy to GitHub Pages on: push: branches: [main] workflow_dispatch: permissions: contents: read pages: write id-token: write # Let a running deploy finish rather than cancelling it mid-publish. concurrency: group: github-pages cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.4' bundler-cache: true # Uses _config.yml only, which carries the tiennm99.github.io/penny-pincher-provider # url and baseurl. actions/configure-pages is deliberately not used — it would # overwrite that baseurl with its own guess. - name: Build site run: bundle exec jekyll build env: JEKYLL_ENV: production - uses: actions/upload-pages-artifact@v3 with: path: _site deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v4