Selaa lähdekoodia

Fix CI 3

master
Palash Bansal 1 vuosi sitten
vanhempi
commit
41b0346aaf
No account linked to committer's email address
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1
    1
      .github/workflows/deploy-pages.yml
  2. 1
    1
      scripts/generate-example-env.mjs

+ 1
- 1
.github/workflows/deploy-pages.yml Näytä tiedosto

cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- run: npm ci # this will also run `npm run prepare` which will build # todo use --cache .npm - run: npm ci # this will also run `npm run prepare` which will build # todo use --cache .npm
env: env:
DOT_ENV_CONTENT: ${{ secrets.examples_dot_env }}
DOT_ENV_CONTENT: ${{ secrets.examples_dot_env }} # todo well...
- run: npm run build-site # builds to _site - run: npm run build-site # builds to _site
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3

+ 1
- 1
scripts/generate-example-env.mjs Näytä tiedosto



// Parse DOT_ENV_CONTENT environment variable as .env file if it exists(for ci) // Parse DOT_ENV_CONTENT environment variable as .env file if it exists(for ci)
if (process.env.DOT_ENV_CONTENT) { if (process.env.DOT_ENV_CONTENT) {
const envConfig = dotenv.parse(process.env.TP_EX)
const envConfig = dotenv.parse(process.env.DOT_ENV_CONTENT)
for (const key in envConfig) { for (const key in envConfig) {
process.env[key] = envConfig[key] process.env[key] = envConfig[key]
} }

Loading…
Peruuta
Tallenna