2019-11-19 23:11:21 +08:00
|
|
|
name: integration-tests
|
2019-08-26 23:36:17 +08:00
|
|
|
on:
|
2019-09-06 10:34:59 +08:00
|
|
|
schedule:
|
2020-03-31 23:26:52 +08:00
|
|
|
- cron: 30 15 * * 0-6
|
2020-01-12 08:13:04 +08:00
|
|
|
push:
|
2020-02-22 22:23:41 +08:00
|
|
|
tags-ignore:
|
|
|
|
- '*.*'
|
2020-01-12 08:13:04 +08:00
|
|
|
branches:
|
|
|
|
- dev
|
2020-12-16 07:32:06 +08:00
|
|
|
- releases/v4
|
2020-01-12 08:13:04 +08:00
|
|
|
|
2019-08-26 23:36:17 +08:00
|
|
|
jobs:
|
2020-01-12 08:24:34 +08:00
|
|
|
# Deploys using checkout@v1 with an ACCESS_TOKEN.
|
2020-01-12 08:13:04 +08:00
|
|
|
integration-checkout-v1:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-12 08:13:04 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
token: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
branch: gh-pages
|
|
|
|
folder: integration
|
|
|
|
target_folder: cat/montezuma
|
|
|
|
git_config_name: Montezuma
|
|
|
|
git_config_email: montezuma@jamesiv.es
|
2020-01-12 08:13:04 +08:00
|
|
|
|
2020-04-01 00:26:01 +08:00
|
|
|
- name: Cleanup Generated Branch
|
|
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branches: gh-pages
|
|
|
|
|
2020-01-12 08:24:34 +08:00
|
|
|
# Deploys using checkout@v2 with a GITHUB_TOKEN.
|
2020-01-12 08:13:04 +08:00
|
|
|
integration-checkout-v2:
|
2020-01-12 08:13:51 +08:00
|
|
|
needs: integration-checkout-v1
|
2020-01-12 08:13:04 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-01-28 12:55:28 +08:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2020-01-12 08:13:04 +08:00
|
|
|
|
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-12 08:13:04 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
branch: gh-pages
|
|
|
|
folder: integration
|
|
|
|
target_folder: cat/montezuma2
|
2020-01-12 08:13:04 +08:00
|
|
|
|
2020-04-01 00:26:01 +08:00
|
|
|
- name: Cleanup Generated Branch
|
|
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branches: gh-pages
|
|
|
|
|
2020-01-14 23:04:59 +08:00
|
|
|
|
|
|
|
# Deploys using a container that requires you to install rsync.
|
|
|
|
integration-container:
|
|
|
|
needs: integration-checkout-v2
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ruby:2.6
|
|
|
|
env:
|
|
|
|
LANG: C.UTF-8
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-01-19 06:38:08 +08:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2020-01-14 23:04:59 +08:00
|
|
|
|
|
|
|
- name: Install rsync
|
|
|
|
run: |
|
|
|
|
apt-get update && apt-get install -y rsync
|
|
|
|
|
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-14 23:04:59 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
branch: gh-pages
|
|
|
|
folder: integration
|
|
|
|
target_folder: cat/montezuma2
|
2020-01-14 23:04:59 +08:00
|
|
|
|
2020-04-01 00:26:31 +08:00
|
|
|
- name: Cleanup Generated Branch
|
2020-04-01 00:26:01 +08:00
|
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branches: gh-pages
|
|
|
|
|
2020-01-20 02:15:19 +08:00
|
|
|
# Deploys using an SSH key.
|
|
|
|
integration-ssh:
|
|
|
|
needs: integration-container
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
|
|
|
- name: Install SSH Client
|
2020-11-18 04:36:57 +08:00
|
|
|
uses: webfactory/ssh-agent@v0.4.1
|
2020-01-20 02:15:19 +08:00
|
|
|
with:
|
|
|
|
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
|
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-20 02:15:19 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
ssh: true
|
|
|
|
branch: gh-pages
|
|
|
|
folder: integration
|
|
|
|
target_folder: cat/montezuma3
|
2020-01-20 02:15:19 +08:00
|
|
|
|
2020-04-01 00:26:01 +08:00
|
|
|
- name: Cleanup Generated Branch
|
|
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branches: gh-pages
|
|
|
|
|
2020-01-20 02:15:19 +08:00
|
|
|
# Deploys using a custom env.
|
|
|
|
integration-env:
|
|
|
|
needs: integration-ssh
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-18 00:57:42 +08:00
|
|
|
- uses: actions/setup-node@v1.4.4
|
2020-01-20 02:15:19 +08:00
|
|
|
with:
|
|
|
|
node-version: '10.x'
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
|
|
|
- name: Install SSH Client
|
2020-11-18 04:36:57 +08:00
|
|
|
uses: webfactory/ssh-agent@v0.4.1
|
2020-01-20 02:15:19 +08:00
|
|
|
with:
|
|
|
|
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
|
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-20 02:15:19 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
ssh: true
|
|
|
|
branch: gh-pages
|
|
|
|
folder: integration
|
|
|
|
target_folder: cat/montezuma4
|
2020-01-20 02:15:19 +08:00
|
|
|
|
2020-04-01 00:26:01 +08:00
|
|
|
- name: Cleanup Generated Branch
|
|
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branches: gh-pages
|
|
|
|
|
|
|
|
# Deploys using the CLEAN option.
|
2020-01-12 08:13:04 +08:00
|
|
|
integration-clean:
|
2020-01-20 02:15:19 +08:00
|
|
|
needs: [integration-checkout-v1, integration-checkout-v2, integration-container, integration-ssh, integration-env]
|
2019-08-26 23:36:17 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-01-12 08:13:04 +08:00
|
|
|
- name: Checkout
|
2020-01-19 06:38:08 +08:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2019-08-26 23:36:17 +08:00
|
|
|
|
2020-01-12 08:13:04 +08:00
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-12 08:13:04 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
token: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
branch: gh-pages
|
|
|
|
folder: integration
|
|
|
|
clean: true
|
2020-01-12 08:21:50 +08:00
|
|
|
|
2020-03-31 08:44:09 +08:00
|
|
|
# Deploys to a branch that doesn't exist with SINGLE_COMMIT.
|
2020-01-12 08:21:50 +08:00
|
|
|
integration-branch-creation:
|
2020-06-07 00:43:20 +08:00
|
|
|
needs: integration-clean
|
2020-01-12 08:21:50 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2020-01-19 06:38:08 +08:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2020-01-12 08:21:50 +08:00
|
|
|
|
|
|
|
- name: Build and Deploy
|
2020-12-16 07:32:06 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v4
|
2020-01-12 08:21:50 +08:00
|
|
|
with:
|
2020-12-16 07:32:06 +08:00
|
|
|
token: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
branch: integration-test-delete-prod
|
|
|
|
folder: integration
|
|
|
|
single_commit: true
|
2020-01-12 08:21:50 +08:00
|
|
|
|
|
|
|
- name: Cleanup Generated Branch
|
2020-01-12 08:47:17 +08:00
|
|
|
uses: dawidd6/action-delete-branch@v2.0.1
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2020-01-19 06:38:08 +08:00
|
|
|
branches: integration-test-delete-prod
|