-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update google analytics, add staging deployment makefile & gh actions
- Loading branch information
1 parent
e70be2e
commit 99d7cf6
Showing
3 changed files
with
50 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Deploy staging branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
staging_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: "Checkout a9s-cli-v2" | ||
with: | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | ||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | ||
token: ${{ secrets.GIT_TOKEN }} | ||
- name: Install | ||
run: | | ||
yarn | ||
yarn run docusaurus build | ||
PASSWORD=${{secrets.HTPASSWD}} make config_staging | ||
- uses: citizen-of-planet-earth/cf-cli-action@master | ||
with: | ||
cf_api: https://api.de.a9s.eu | ||
cf_username: ${{ secrets.PAAS_EMAIL }} | ||
cf_password: ${{ secrets.PAAS_PASSWORD }} | ||
cf_org: anynines | ||
cf_space: staging | ||
command: push a9s-cliv-v2-staging -p docs/build |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
config_staging: guard-PASSWORD | ||
cd build && echo "force_https: true" > Staticfile | ||
cd build && htpasswd -nb anynines ${PASSWORD} > Staticfile.auth | ||
|
||
deploy_staging: | ||
cf t -o anynines -s staging | ||
cd build && cf push a9s-cli-v2-staging | ||
|
||
cleanup: | ||
rm -rf build/Staticfile | ||
rm -rf build/Staticfile.auth | ||
|
||
staging: config_staging deploy_staging cleanup | ||
|
||
guard-%: | ||
@ if [ "${${*}}" = "" ]; then \ | ||
echo "Environment variable $* not set"; \ | ||
exit 1; \ | ||
fi |
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