diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 59c0f63..ab9f816 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -4,8 +4,16 @@ on: push: branches: [main] +permissions: + pages: write # to deploy to Pages + id-token: write + jobs: build: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-22.04 steps: @@ -26,4 +34,17 @@ jobs: bundler-cache: true - name: Build site - run: JEKYLL_ENV=production bundle exec jekyll build + env: + JEKYLL_ENV: production + run: bundle exec jekyll build + + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v2 + + - name: "what is page_url" + run: echo "${{ steps.deployment.outputs.page_url }}" + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2