Skip to content

Commit

Permalink
add github workflow for building github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rainu committed Oct 29, 2024
1 parent cae1b2f commit 028d61c
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Application to Github-Pages

on:
push:
tags:
- v*

workflow_dispatch:

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

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Build and generate application
env:
GIT_REF_NAME: ${{ github.ref_name}}
run: |
npm install
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

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

0 comments on commit 028d61c

Please sign in to comment.