-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.04 KB
/
test-build.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
name: 👷 Deploy test site to github pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v3
- name: Install
run: |
npm ci
npm install @rollup/rollup-linux-x64-gnu
- name: Build and Deploy
env:
NODE_ENV: production
# This is set automatically by github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "Automated"
git config user.email "[email protected]"
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/open-pv/website.git
echo "User-agent: *" > public/robots.txt
echo "Disallow: /" >> public/robots.txt
echo "test.openpv.de" > public/CNAME
npm run build
npm run deploy:test