Skip to content

Commit

Permalink
ci: update deploy site workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MindTooth committed May 15, 2023
1 parent b3ac452 commit 3ed699f
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
name: Build & Deploy
---
name: Deploy static content to Pages

on:
push:
branches:
- master
branches: [$default-branch]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
Expand All @@ -13,37 +24,27 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Use Node.js
uses: actions/setup-node@v3
- run: npm ci
- run: npm run build --if-present

- name: Install Dependencies
run: npm ci

- name: Build Site
run: npm run build --if-present

- name: Upload Compiled Files
uses: actions/upload-artifact@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
name: dist
path: ./dist
path: dist/

deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

needs: build

steps:
- name: Download Compiled Files
uses: actions/download-artifact@v3
with:
name: dist
path: ./dist

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.9.3
with:
deploy_key: ${{ secrets.SRCERY_DEPLOY_KEY }}
publish_branch: site # deploying branch
publish_dir: ./dist
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 3ed699f

Please sign in to comment.