summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2024-04-29 12:24:45 +0100
committerDaniil Baturin <daniil@baturin.org>2024-04-29 12:38:30 +0100
commit00e864834b160cdfaa86e1facdee87153dc9396f (patch)
tree01e87d2e327d3537806d457690dbea468026120c
parent354e8b2a22c65952afc3a93323d1dac7cf898964 (diff)
downloadcommunity.vyos.net-00e864834b160cdfaa86e1facdee87153dc9396f.tar.gz
community.vyos.net-00e864834b160cdfaa86e1facdee87153dc9396f.zip
Use environment variables instead of secrets for non-secret data
like soupault settings and site names
-rw-r--r--.github/workflows/main.yml10
1 files changed, 2 insertions, 8 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 710c4a5..a94179b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,16 +14,11 @@ on:
workflow_dispatch:
workflow_call:
secrets:
- NETLIFY_SITE_NAME:
- required: true
NETLIFY_TOKEN:
required: true
- SOUPAULT_PROFILE:
- required: true
GH_ACCESS_TOKEN:
required: true
-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
@@ -69,7 +64,7 @@ jobs:
# SOUPAULT_PROFILE is "staging" for the main branch,
# it enabled a preview version warning.
# The "live" profile simply enabled listing nightly builds
- SOUPAULT_OPTS: "--profile ${{ secrets.SOUPAULT_PROFILE }} --profile live"
+ SOUPAULT_OPTS: "--profile ${{ vars.SOUPAULT_PROFILE }} --profile live"
run: |
source ./bin/activate
make all
@@ -77,7 +72,6 @@ jobs:
- name: Deploy to Netlify
env:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
- NETLIFY_SITE_NAME: ${{ secrets.NETLIFY_SITE_NAME }}
run: |
zip -r website.zip build/
- curl --show-error --fail -H "Content-Type: application/zip" -H "Authorization: Bearer $NETLIFY_TOKEN" --data-binary "@website.zip" https://api.netlify.com/api/v1/sites/$NETLIFY_SITE_NAME/deploys
+ curl --show-error --fail -H "Content-Type: application/zip" -H "Authorization: Bearer $NETLIFY_TOKEN" --data-binary "@website.zip" https://api.netlify.com/api/v1/sites/${{vars.NETLIFY_SITE_NAME}}/deploys