Last active
July 5, 2021 13:57
-
-
Save siriwatknp/bd318485d5b0c12049be258997ad0093 to your computer and use it in GitHub Desktop.
Github actions for Gatsby + firebase hosting
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
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
- name: Install Dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Archive Production Artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: public | |
path: public | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
- name: Download Artifact | |
uses: actions/download-artifact@master | |
with: | |
name: public | |
- name: Deploy to Firebase | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy --only hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey guys,
I am using reCAPTCHA v3 on my Gatsby website and need to pass the API key to the component. For this I wanted to use the Secrets from Github Actions but where do I have to position the env variable in the action.yml so that I can retrieve it in Gatsby with process.env.RECAPTCHA_API_KEY?