fix: install #36
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: ['master'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
run: git clone https://github.com/${{ github.repository }}.git | |
- name: Display current directory and contents | |
run: | | |
pwd | |
ls -la | |
- name: Detect package manager | |
id: detect-package-manager | |
run: | | |
echo "manager=npm" >> $GITHUB_ENV | |
echo "command=install" >> $GITHUB_ENV | |
- name: Setup Node | |
run: | | |
echo "Setup Node" | |
node -v | |
npm -v | |
shell: bash | |
- name: Install dependencies | |
run: npm install | |
- name: Build the project | |
run: npm run build | |
- name: Generate static files | |
run: npm run generate | |
- name: Upload artifact | |
run: mv ./dist ${{ github.workspace }}/dist | |
# Deployment job | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
run: git clone https://github.com/${{ github.repository }}.git | |
- name: Deploy to GitHub Pages | |
run: | | |
cd cozy-house | |
git checkout gh-pages | |
git rm -r . | |
cp -a ../dist/. . | |
git add . | |
git commit -m "Deploying to gh-pages" | |
git push origin gh-pages |