Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deploy.yml): Fix .env file to project when built #51

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "20"
# Create .env file before build project
- name: 'Create env file'
run: |
touch .env
echo RECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY }} >> .env
echo DEVTOOLS=${{ vars.DEVTOOLS }} >> .env
echo API_FORM_URL=${{ vars.API_FORM_URL }} >> .env
# Pick your own package manager and build script
- run: npm install
- run: npx nuxt build --preset github_pages
Expand All @@ -25,11 +32,6 @@ jobs:
deploy:
# Add a dependency to the build job
needs: build
# Environment variables in repository
env:
RECAPTCHA_SITE_KEY: ${{ secrets.RECAPTCHA_SITE_KEY }}
DEVTOOLS: ${{ vars.DEVTOOLS }}
API_FORM_URL: ${{ vars.API_FORM_URL }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
Expand Down
Loading