Update build-and-deploy.yml reverting to versions as I found them #35
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 moorhen.org | |
on: | |
push: | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Install node.js v16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Update mirrors | |
working-directory: /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/ | |
run: sudo apt-get update -y | |
- name: Install dependencies | |
working-directory: /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/ | |
run: sudo apt-get install -y npm | |
- name: npm install | |
working-directory: /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/ | |
run: npm install | |
- name: Copy baby-gru into public | |
working-directory: /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/ | |
run: cp -r /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/node_modules/moorhen/baby-gru/ /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/public/ | |
- name: npm build | |
working-directory: /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/ | |
run: npm run build | |
- name: Copy coi service worker | |
run: cp /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/node_modules/coi-serviceworker/coi-serviceworker.min.js dist/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: page | |
path: /home/runner/work/MoorhenOrgBuild/MoorhenOrgBuild/dist | |
if-no-files-found: error | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@master | |
with: | |
name: page | |
path: . | |
- uses: actions/configure-pages@v1 | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: . | |
- id: deployment | |
uses: actions/deploy-pages@main |