diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 180bf50..eb24591 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -1,23 +1,46 @@ -name: Build and deploy Jekyll site to GitHub Pages +name: Deploy Jekyll site to Pages on: push: - branches: - - master + branches: ["master"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false jobs: - github-pages: + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }} - restore-keys: | - ${{ runner.os }}-gems- - - uses: helaili/jekyll-action@v2 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} - #token: $PAGES_GITHUB_TOKEN - target_branch: gh-pages + ruby-version: '3.1' + bundler-cache: true + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Build site + run: bundle exec jekyll build + env: + JEKYLL_ENV: production + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2