diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ded529d..a2cf318 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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