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

Appengine deploy workflow on master for testing #5005

Merged
Merged
Show file tree
Hide file tree
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
54 changes: 54 additions & 0 deletions .github/workflows/appengine_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Workflow that prepares files and deploys to appengine

name: Deploy to App Engine

# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest

steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
# When running manually this checks out the master branch.
- uses: actions/checkout@v2

- name: Prepare demo files
# Install all dependencies, then copy all the files needed for demos.
run: |
npm install
npm run prepareDemos

- name: Upload
uses: actions/upload-artifact@v2
with:
name: appengine_files
path: _deploy/

deploy:
name: Deploy
runs-on: ubuntu-latest
# The prepare step must succeed for this step to run.
needs: prepare
steps:
- name: Download prepared files
uses: actions/download-artifact@v2
with:
name: appengine_files
path: _deploy/

- name: Deploy to App Engine
uses: google-github-actions/deploy-appengine@v0.2.0
# For parameters see:
# https://github.com/google-github-actions/deploy-appengine#inputs
with:
working_directory: _deploy/
deliverables: app.yaml
project_id: ${{ secrets.GCP_PROJECT }}
credentials: ${{ secrets.GCP_SA_KEY }}
promote: false
version: vtest
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
package: packageTasks.package,
checkLicenses: licenseTasks.checkLicenses,
recompile: releaseTasks.recompile,
prepareDemos: appengineTasks.prepareDemos,
publish: releaseTasks.publish,
publishBeta: releaseTasks.publishBeta,
sortRequires: cleanupTasks.sortRequires,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"lint": "eslint .",
"package": "gulp package",
"prepare": "npm run package",
"prepareDemos": "gulp prepareDemos",
"publish": "gulp publish",
"publish:beta": "gulp publishBeta",
"recompile": "gulp recompile",
Expand Down
16 changes: 9 additions & 7 deletions scripts/gulpfiles/appengine_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,19 @@ function deployAndClean(done) {
done();
}

/**
* Prepares demos.
*/
const prepareDemos = gulp.series(
prepareDeployDir, copyStaticSrc, copyAppengineSrc, copyPlaygroundDeps);


/**
* Deploys demos.
*/
const deployDemos = gulp.series(
prepareDeployDir,
copyStaticSrc,
copyAppengineSrc,
copyPlaygroundDeps,
deployAndClean
);
const deployDemos = gulp.series(prepareDemos, deployAndClean);

module.exports = {
deployDemos: deployDemos,
prepareDemos: prepareDemos
}