Skip to content

climate-profile-full_v3.0.9 #48

climate-profile-full_v3.0.9

climate-profile-full_v3.0.9 #48

Workflow file for this run

name: Deploy to GitHub Pages
# This workflow will trigger on any tag/release created on *any* branch
# Make sure to create tags/releases only from the "master" branch for consistency
on:
release:
types: [published]
jobs:
lint-export-client:
name: Lint and Export client
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_BASE_PATH: ${{ secrets.NEXT_PUBLIC_BASE_PATH }}
NEXT_PUBLIC_FIREBASE_WEB_API_KEY: ${{ secrets.FIREBASE_WEB_API_KEY_PROD }}
NEXT_PUBLIC_FIREBASE_WEB_AUTHDOMAIN: ${{ secrets.FIREBASE_WEB_AUTHDOMAIN_PROD }}
NEXT_PUBLIC_FIREBASE_WEB_PROJECT_ID: ${{ secrets.FIREBASE_WEB_PROJECT_ID_PROD }}
NEXT_PUBLIC_FIREBASE_WEB_STORAGE_BUCKET: ${{ secrets.FIREBASE_WEB_STORAGE_BUCKET_PROD }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Use NodeJS v16.14.2
uses: actions/setup-node@v3
with:
node-version: 16.14.2
- name: Install Dependencies and lint
run: |
cd client
npm install
- name: Lint
run: |
cd client
npm run lint
- name: Export static files
run: |
cd client
npm run export
mv out/404/index.html out/404.html
- name: Disable Jekyll
run: touch client/out/.nojekyll
- name: Archive Development Artifact
uses: actions/upload-artifact@v3
with:
name: main-out
path: client/out
retention-days: 3
deploy-client:
name: Deploy client to Github Pages
needs: lint-export-client
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: main-out
- name: List files for publish
run: ls -l -a
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
publish_branch: gh-pages