Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen committed Jan 9, 2025
1 parent 1102504 commit 01a5e73
Showing 1 changed file with 46 additions and 20 deletions.
66 changes: 46 additions & 20 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ permissions:
pages: write

jobs:
release:
name: Release Version
build:
name: Build Next.js App
runs-on: ubuntu-latest

if: |
Expand All @@ -23,6 +23,12 @@ jobs:
startsWith(github.head_ref, 'dependabot/') == false)
steps:
- name: Setup Pages
id: setup-pages
uses: actions/configure-pages@v5
with:
static_site_generator: next

- name: Checkout
id: checkout
uses: actions/checkout@v4
Expand All @@ -40,6 +46,44 @@ jobs:
id: install
run: npm ci

- name: Build
id: build
run: npm run build

- name: Upload Artifact
id: upload
uses: actions/upload-pages-artifact@v3
with:
path: ./out

deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest

needs: build

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

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

release:
name: Release Version
runs-on: ubuntu-latest

needs: deploy

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Tag
id: tag
uses: issue-ops/semver@v2
Expand All @@ -53,21 +97,3 @@ jobs:
uses: issue-ops/releaser@v2
with:
tag: v${{ steps.tag.outputs.version }}

- name: Setup Pages
id: setup-pages
uses: actions/configure-pages@v4
with:
static_site_generator: next

- name: Build
id: build
run: npm run build

- name: Deploy
id: deploy
uses: actions/deploy-pages@v4
with:
branch: gh-pages
folder: out
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 01a5e73

Please sign in to comment.