readme updated #67
This file contains hidden or 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: Deploy CI/CD | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'website/**' | |
- '.github/workflows/deploy.yml' | |
workflow_dispatch: | |
jobs: | |
job: | |
name: Build website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.sha }} | |
fetch-depth: '0' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ vars.NODE_VERSION }} | |
- name: Deploy with npm | |
run: | | |
cd $GITHUB_WORKSPACE/website | |
npm install | |
git config --global user.name $user_name | |
git config --global user.email $user_email | |
git remote set-url origin https://${github_token}@github.com/${repository} | |
npm run deploy | |
env: | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
repository: ${{ github.repository }} |