Merge pull request #7 from JohnsonMao/develop #23
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy to GitHub pages | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Set up PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install and Build 🔧 | |
run: | | |
pnpm install | |
pnpm build | |
env: | |
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID}} | |
VITE_CLIENT_SECRET: ${{ secrets.VITE_CLIENT_SECRET}} | |
VITE_MAP_STYLE_ID: ${{ secrets.VITE_MAP_STYLE_ID}} | |
VITE_MAP_USERNAME: ${{ secrets.VITE_MAP_USERNAME}} | |
VITE_MAP_TOKEN: ${{ secrets.VITE_MAP_TOKEN}} | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: dist |