diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e81282..ae36a80 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,7 +42,7 @@ jobs: run: swift test site-build: - name: Site Build + name: Build Site runs-on: macos-15 steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 0000000..ee3b57d --- /dev/null +++ b/.github/workflows/site.yml @@ -0,0 +1,51 @@ +name: Deploy Site to GitHub Pages + +on: + push: + branches: [ master ] + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Build site + run: bundle exec rake site:build + env: + JEKYLL_ENV: production + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site + + 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@v4