2020-03-23 21:46:02 +01:00
|
|
|
name: Deploy
|
|
|
|
on:
|
|
|
|
push:
|
2020-04-04 18:02:51 +02:00
|
|
|
branches: [ 'gh-pages' ]
|
2020-03-23 21:46:02 +01:00
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-29 14:12:42 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-03-23 21:46:02 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: 'gh-pages'
|
2020-11-29 14:12:42 +01:00
|
|
|
- name: Setup GCloud
|
2020-12-04 20:22:42 +01:00
|
|
|
uses: google-github-actions/setup-gcloud@master
|
2020-03-23 21:46:02 +01:00
|
|
|
with:
|
|
|
|
version: '285.0.0'
|
|
|
|
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
|
|
|
export_default_credentials: true
|
|
|
|
- name: Restore git mtime
|
|
|
|
run: curl -Ss https://raw.githubusercontent.com/MestreLion/git-tools/f3cc70b73200154d027554714c354f35a08680ed/git-restore-mtime | python3
|
|
|
|
- name: Sync
|
|
|
|
run: gsutil -m rsync -r -d -x "^\.|^[a-f\d-]{36}$|^README\.md$" . gs://app.keeweb.info/
|