actions: install dependencies #5
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 Website | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build-blog: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./blog | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
cache-dependency-path: './blog/package-lock.json' | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Blog | |
run: npm run build | |
- name: Copy to Output Directory | |
shell: bash | |
run: | | |
mkdir -p /output/blog | |
cp ./build/* /output/blog/ | |
deploy-to-github-pages: | |
needs: build-blog | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: manic-so | |
path: manic-so |