Merge pull request #21 from numselli/snyk-fix-46d86379a1b2e999b6dfbb4… #31
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
# Sample workflow for building and deploying a Nuxt site to GitHub Pages | |
# | |
# To get started with Nuxt see: https://nuxtjs.org/docs/get-started/installation | |
# | |
name: Deploy Nuxt site to Pages | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: ${{ steps.detect-package-manager.outputs.manager }} | |
- name: Install dependencies | |
run: cd src && npm install | |
- name: Build Vue | |
run: cd src && npm run build | |
- name: Move dirs around | |
run: | | |
mkdir buildDir | |
mv docker-compose.yml buildDir/ | |
mkdir buildDir/src | |
mv src/Dockerfile buildDir/src | |
mv src/.output buildDir/src | |
mv buildDir/src/.output buildDir/src/out | |
- name: Commit changes | |
run: | | |
cd buildDir | |
git config --global user.email "[email protected]" | |
git config --global user.name "CI" | |
git init | |
git add -A | |
git commit -m 'deploy' | |
git push -f https://${{ vars.username }}:${{ secrets.token }}@github.com/${{ vars.username }}/portfolio.git master:builds |