Skip to content

update workflow

update workflow #10

Workflow file for this run

name: Build Web Client
on:
push:
branches:
- main
paths:
- 'web/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '18'
- name: Install Dependencies
run: npm install
working-directory: ./web
- name: Build
run: npm run production
working-directory: ./web
- name: List build directory contents
run: ls -lah dist/production
working-directory: ./web
- name: Remove dist from .gitignore
run: sed -i '/dist/d' ./web/.gitignore
- name: Deploy to Dist Branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.BUILD_TOKEN }}
publish_dir: ./web/dist/production
publish_branch: built
keep_files: true
# - name: Deploy to Built Branch
# run: |
# pwd
# git config --global user.name 'Ian Johnson'
# git config --global user.email '[email protected]'
# git checkout -b built
# git add -f web/dist/production
# git commit -m "Deploying build"
# git push --force https://${{ secrets.MY_PERSONAL_TOKEN }}:[email protected]/enjalot/latent-scope.git built