Skip to content

Update Dates

Update Dates #939

Workflow file for this run

name: Node.js CI and Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# Add more Node.js versions as needed
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Create .env file
run: |
echo "JSON_RPC_PROVIDER=${{ secrets.JSON_RPC_PROVIDER }}" > .env.local
echo "GH_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> .env.local
- name: Check if secret is available
run: |
if [ "${{ secrets.GITHUB_TOKEN }}" != '' ]; then
echo "true, secret is available. ";
else
echo "false, secret is not available. ";
fi
- name: Build and export
run: |
npm run build
npm run export
touch ./out/.nojekyll
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out
clean: true # Optional: clean existing files in the branch
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set deployment status
run: echo "Deployment to GitHub Pages succeeded"