Skip to content

Commit

Permalink
build: set up GHA page action
Browse files Browse the repository at this point in the history
  • Loading branch information
abiriadev committed Dec 11, 2023
1 parent 616a1f1 commit 88c0bfc
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
$schema: https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
name: Deploy frontend
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.0
with:
node-version-file: .node-version
cache: pnpm
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: pnpm install
- name: Build frontend
run: pnpm build
working_directory: frontend
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./dist
deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: GitHub Pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3.0.1

0 comments on commit 88c0bfc

Please sign in to comment.