mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Initial commit for appengine deploy action
This commit is contained in:
54
.github/workflows/appengine_deploy.yml
vendored
Normal file
54
.github/workflows/appengine_deploy.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
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:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Prepare demo files
|
||||
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
|
||||
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
|
||||
with:
|
||||
deliverables: app.yaml
|
||||
working_directory: _deploy/
|
||||
# TODO: Set up project id and credentials secrets
|
||||
project_id: ${{ secrets.GCP_PROJECT }}
|
||||
credentials: ${{ secrets.GCP_SA_KEY }}
|
||||
promote: false
|
||||
# TODO: Generate a version string based on package.json
|
||||
version: vtest
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user