Skip to content

Commit

Permalink
feat: github action for deploying pages
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Jan 9, 2024
1 parent ae1fa3a commit ddbb52b
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
- main
- release/**

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -37,21 +35,22 @@ jobs:
name: "build-artifact-${{ github.sha }}"
path: build

deploy:
production-deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3

- name: 📦 Download Build Artifact
uses: actions/download-artifact@v2
with:
name: "build-artifact-${{ github.sha }}"
path: build

- name: 🔺 Publish our Build Artifacts
uses: actions/upload-pages-artifact@v2
permissions:
pages: write
contents: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
with:
name: github-pages
path: build
artifact_name: "build-artifact-${{ github.sha }}"
preview: true

0 comments on commit ddbb52b

Please sign in to comment.