Skip to content

feat: add set-up Node.js version to fix CI error (#3) #3

feat: add set-up Node.js version to fix CI error (#3)

feat: add set-up Node.js version to fix CI error (#3) #3

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
# env:
# CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 20
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install and Build 🔧
run: |
yarn install
# yarn crowdin:sync
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
git-config-name: ${{ secrets.GH_NAME }}
git-config-email: ${{ secrets.GH_EMAIL }}
repository-name: casdoor/casdoorapp.github.io
branch: master # The deploy branch.
folder: build # The deploy folder.