-
Notifications
You must be signed in to change notification settings - Fork 154
44 lines (38 loc) · 1.14 KB
/
build-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
on:
push
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update apt repos
run: sudo apt-get update
- name: Set the correct Node version using nvm
shell: bash -l {0}
run: nvm install
- name: Install yarn
shell: bash -l {0}
run: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-get update && sudo apt-get install yarn
- name: Install dependencies
shell: bash -l {0}
run: nvm use && yarn install && yarn run dev
- name: Upload site
uses: actions/upload-artifact@v3
with:
name: vergecurrency.com
path: |
./src/*.js
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3