-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.62 KB
/
main_CD.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Deploy_To_Azure_Blobs_Prod
on:
release:
types: [published]
env:
STORAGE_ACCOUNT_NAME: sadatastoresearchprod
STORAGE_ACCOUNT_KEY: ${{ secrets.PROD_STORAGE_KEY }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install dependencies
run: |
npm install
- name: Create production index.html
run: |
mv index.prod.html index.html
- name: Run build
run: |
npm run build:production
- name: Create robots.txt
run: |
echo -e 'User-agent: *\nDisallow:\nSitemap: https://datastore.iatistandard.org/sitemap-index.xml\n' > dist/robots.txt
- name: Upload to blob storage
uses: azure/CLI@v1
with:
azcliversion: 2.34.0
inlineScript: |
az storage blob upload-batch \
--overwrite true \
--account-name ${{ env.STORAGE_ACCOUNT_NAME }} \
--account-key ${{ env.STORAGE_ACCOUNT_KEY }} \
-d '$web' \
-s dist/
integration-test:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Cypress CI Run
uses: cypress-io/github-action@v6
with:
wait-on: "https://datastore.iatistandard.org"
config-file: cypress.config.prod.js