-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge all
- Loading branch information
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,29 @@ jobs: | |
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Set current date as env variable" | ||
run: | | ||
echo "builddate=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
id: version # this is used on variable path | ||
|
||
- uses: actions/checkout@v3 | ||
- run: npm ci && npm run build | ||
|
||
- name: Extract NPM version | ||
id: extract_version | ||
uses: Saionaro/[email protected] | ||
|
||
- name: Set Environement and Build | ||
run: | | ||
touch .env.local | ||
echo NEXT_PUBLIC_APP_ONBOARD_APIKEY=${{ secrets.NEXT_PUBLIC_APP_ONBOARD_APIKEY }} >> .env.local | ||
echo NEXT_PUBLIC_APP_ANKR_APIKEY=${{ secrets.NEXT_PUBLIC_APP_ANKR_APIKEY }} >> .env.local | ||
echo NEXT_PUBLIC_APP_VERSION=${{ steps.extract_version.outputs.version }} >> .env.local | ||
echo NEXT_PUBLIC_APP_BUILD_DATE=${{ steps.version.outputs.builddate }} >> .env.local | ||
echo NEXT_PUBLIC_APP_IS_PROD=true >> .env.local | ||
npm ci && npm run build | ||
env: | ||
CI: false | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
|