Inject environment variables with GitHub Actions & Secrets, move relevant packages back into devDependencies

This commit is contained in:
Xevion
2022-05-13 04:24:06 -05:00
parent dc67373dff
commit 114f909bb2
3 changed files with 22 additions and 9 deletions

View File

@@ -3,6 +3,11 @@ name: Deploy to Firebase Hosting on merge
push: push:
branches: branches:
- master - master
env:
VUE_APP_ALGOLIA_APP_ID: '${{ secrets.ALGOLIA_APP_ID }}'
VUE_APP_ALGOLIA_API_KEY: '${{ secrets.ALGOLIA_API_KEY }}'
jobs: jobs:
build_and_deploy: build_and_deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -1,12 +1,20 @@
name: Deploy to Firebase Hosting on PR name: Deploy to Firebase Hosting on PR
'on': pull_request 'on': pull_request
env:
VUE_APP_ALGOLIA_APP_ID: '${{ secrets.ALGOLIA_APP_ID }}'
VUE_APP_ALGOLIA_API_KEY: '${{ secrets.ALGOLIA_API_KEY }}'
jobs: jobs:
build_and_preview: build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@master - uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn run build - run: yarn run build
- uses: FirebaseExtended/action-hosting-deploy@v0 - uses: FirebaseExtended/action-hosting-deploy@v0
with: with:

View File

@@ -33,19 +33,19 @@
"@vue/cli-plugin-babel": "^4.4.0", "@vue/cli-plugin-babel": "^4.4.0",
"@vue/cli-plugin-eslint": "^4.4.0", "@vue/cli-plugin-eslint": "^4.4.0",
"@vue/cli-service": "^4.4.0", "@vue/cli-service": "^4.4.0",
"@vue/eslint-config-airbnb": "^5.0.2",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.1.1",
"sass": "^1.26.5", "sass": "^1.26.5",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
}, },
"devDependencies": { "devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^6.2.2",
"@vue/eslint-config-airbnb": "^5.0.2",
"@vue/eslint-config-prettier": "^6.0.0",
"prettier": "^2.1.1"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,