v.0.0.4 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
env: | |
VITE_API_URL: ${{ vars.API_URL }} | |
VITE_ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} | |
run: npm run build | |
- name: Deploy to GitHub Pages | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email 'actions@github.com' | |
git checkout main | |
git add dist -f | |
git commit -m 'Deploy to GitHub Pages' | |
git push origin `git subtree split --prefix dist main`:gh-pages --force |