-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflows, configs, and scripts for new API keys
- Loading branch information
1 parent
38588a5
commit 87361bf
Showing
8 changed files
with
81 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Main migrations | ||
name: Deploy production | ||
|
||
on: | ||
pull_request: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Staging migrations | ||
name: Deploy staging | ||
|
||
on: | ||
pull_request: | ||
|
@@ -43,3 +43,70 @@ jobs: | |
DATO_API_KEY_OPENEARTH_DATA_VIEWER: ${{ secrets.DATO_API_KEY_OPENEARTH_DATA_VIEWER }} | ||
DATO_API_KEY_NL2120: ${{ secrets.DATO_API_KEY_NL2120 }} | ||
run: npm run migrations:apply-staging | ||
|
||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm install --force | ||
|
||
- name: Set matrix data | ||
id: set-matrix | ||
run: | | ||
instances=$(node -e 'console.log(JSON.stringify(require("./config/dato/instances.js").instances))') | ||
echo "matrix=$(echo $instances | jq -c '.')" >> $GITHUB_OUTPUT | ||
echo "matrix is set to: $instances" | ||
deploy-application: | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: ${{ fromJson(needs.prepare.outputs.matrix) }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm install --force | ||
|
||
- name: Build application | ||
run: NODE_OPTIONS="--openssl-legacy-provider" npm run build | ||
env: | ||
DATO_API_KEY_OPENEARTH_RWS_VIEWER: ${{ secrets.DATO_API_KEY_OPENEARTH_RWS_VIEWER }} | ||
DATO_API_KEY_OPENEARTH_DATA_VIEWER: ${{ secrets.DATO_API_KEY_OPENEARTH_DATA_VIEWER }} | ||
DATO_API_KEY_NL2120: ${{ secrets.DATO_API_KEY_NL2120 }} | ||
DATO_INSTANCE_CURRENT: ${{ matrix.name }} | ||
DATO_ENVIRONMENT: staging | ||
VUE_APP_MAPBOX_TOKEN: ${{ secrets.VUE_APP_MAPBOX_TOKEN }} | ||
VUE_APP_API_ENDPOINT: ${{ secrets.VUE_APP_API_ENDPOINT }} | ||
VUE_APP_AQUADESK_KEY: ${{ secrets.VUE_APP_AQUADESK_KEY }} | ||
VUE_APP_PIWIK_CONTAINER_ID: ${{ secrets.VUE_APP_PIWIK_CONTAINER_ID }} | ||
VUE_APP_WMR_KEY: ${{ secrets.VUE_APP_WMR_KEY }} | ||
DEEPL_KEY: ${{ secrets.DEEPL_KEY }} | ||
|
||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: "./dist" | ||
production-branch: main | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: Preview deployment for ${{ matrix.name }} | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ matrix.netlifySiteId }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export const instances: Array<{ | ||
name: string; | ||
key: string; | ||
datoApiKey: string; | ||
netlifySiteId: string; | ||
}>; |
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
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
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
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