Merge pull request #14 from b-smiley/main-site #19
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install Main Site Dependencies | |
working-directory: web-ui | |
run: npm ci | |
- name: Install Blog Site Dependencies | |
working-directory: web-ui/src/pages/Blog/smileysblog | |
run: npm ci | |
- name: Configure Git | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Deploy the project to GitHub Pages | |
working-directory: web-ui | |
run: | | |
git remote set-url origin https://{GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npm run deploy -- -u "github-actions-bot <[email protected]>" | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |