Skip to content

Merge pull request #133 from simplitrac/hamburgermenu-for-chart-and-edit #96

Merge pull request #133 from simplitrac/hamburgermenu-for-chart-and-edit

Merge pull request #133 from simplitrac/hamburgermenu-for-chart-and-edit #96

Workflow file for this run

name: Build and Deploy to GitHub Pages
on:
push:
branches:
- main # Set this to your default branch
env:
ACT: ${{ vars.ACT }}
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Deploy to GitHub Pages
if: env.ACT != 'true'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build # Replace with your build output directory
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'Deploy to GitHub Pages'
- name: Simulate deployment (Act)
if: env.ACT == 'true'
run: |
echo "Simulating deployment to GitHub Pages"
echo "Contents of build directory:"
ls -R ./build # Replace './build' with your actual build directory
echo "In a real deployment, these files would be pushed to the gh-pages branch"
- name: Cleanup (Act)
if: env.ACT == 'true'
run: |
echo "Performing cleanup after Act simulation"
# Add any cleanup steps here, if necessary
# For example, removing build artifacts:
# rm -rf ./build