Fix pinned netlify version (#6668) #82
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
--- | |
name: 'Release: Staging' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- future | |
jobs: | |
queue: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
concurrent_skipping: 'outdated_runs' | |
cancel_others: true | |
skip_after_successful_duplicate: true | |
paths_ignore: '["**/README.md", "**/docs/**"]' | |
do_not_skip: '["workflow_dispatch", "schedule"]' | |
verify: | |
runs-on: ubuntu-latest | |
environment: Staging | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- id: auth | |
uses: google-github-actions/auth@v0 | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
credentials_json: ${{ secrets.GCP_SA_KEY }} | |
- name: Setting up Google Cloud SDK | |
uses: google-github-actions/setup-gcloud@v0 | |
- name: Cloning repository | |
uses: actions/checkout@v2 | |
- name: Setting up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- uses: actions/cache@v3 | |
if: ${{ !env.ACT }} | |
with: | |
path: '**/node_modules' | |
key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Installing Node.js packages | |
run: npm ci | |
- name: Running tests | |
run: | | |
gulp updateTestResources | |
gulp buildPixiFunctions | |
gulp lintNode | |
gulp lintYaml | |
npm run test:platform | |
npm run test:playground | |
npm run test:pixi | |
prepare: | |
needs: verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cloning repository | |
uses: actions/checkout@v2 | |
- name: Setting up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- uses: actions/cache@v3 | |
if: ${{ !env.ACT }} | |
with: | |
path: '**/node_modules' | |
key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Installing Node.js packages | |
run: npm install | |
- name: Preparing build | |
env: | |
APP_ENV: staging | |
AMP_DOC_TOKEN: ${{ secrets.AMP_DOC_TOKEN }} | |
AMP_DEV_PIXI_APIS_KEY: ${{ secrets.AMP_DEV_PIXI_APIS_KEY }} | |
run: | | |
gulp buildPrepare | |
- name: Storing build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-setup | |
path: artifacts/setup.tar.gz | |
build: | |
env: | |
APP_ENV: staging | |
needs: prepare | |
strategy: | |
matrix: | |
language: | |
[ | |
'en', | |
'de', | |
'fr', | |
'ar', | |
'es', | |
'it', | |
'id', | |
'ja', | |
'ko', | |
'pt_BR', | |
'ru', | |
'tr', | |
'zh_CN', | |
'pl', | |
'vi', | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cloning repository | |
uses: actions/checkout@v2 | |
- name: Setting up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- uses: actions/cache@v3 | |
if: ${{ !env.ACT }} | |
with: | |
path: '**/node_modules' | |
key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Installing Node.js packages | |
run: npm install | |
- name: Setting up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
# - uses: actions/cache@v3 | |
# with: | |
# path: ${{ env.pythonLocation }} | |
# key: ${{ env.pythonLocation }} | |
- name: Installing Grow | |
run: | | |
sudo apt-get install libyaml-dev | |
pip install grow --upgrade-strategy eager | |
- name: Fetching build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: build-setup | |
path: artifacts | |
- name: Unpacking artifacts | |
run: | | |
gulp unpackArtifacts | |
- name: Building pages | |
run: | | |
gulp buildPages --locales ${{ matrix.language }} | |
- name: Storing build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pages-${{ github.run_id }}-${{ matrix.language }} | |
path: artifacts | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: Staging | |
steps: | |
- name: Cloning repository | |
uses: actions/checkout@v2 | |
- name: Setting up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- uses: actions/cache@v3 | |
if: ${{ !env.ACT }} | |
with: | |
path: '**/node_modules' | |
key: node_modules-v2-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Installing Node.js packages | |
run: npm install | |
- name: Setting up Google Cloud SDK | |
uses: google-github-actions/setup-gcloud@v0 | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
export_default_credentials: true | |
- name: Fetching build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: artifacts | |
- name: Unpacking artifacts | |
run: | | |
gulp unpackArtifacts | |
- name: Finalizing build | |
run: | | |
gulp buildFinalize | |
npm run smoke-test -- --colors | |
# npm run test:pixi:e2e | |
- name: Deploying | |
run: | | |
gcloud config set app/cloud_build_timeout 1800 | |
gcloud app deploy --quiet --version=1 |