github-pages-deploy-action/.github/workflows/integration-beta.yml

204 lines
5.5 KiB
YAML
Raw Normal View History

2020-03-31 23:55:36 +08:00
name: integration-tests-beta
2020-01-14 23:19:04 +08:00
on:
schedule:
2020-03-31 23:50:43 +08:00
- cron: 30 15 * * 0-6
2020-01-14 23:19:04 +08:00
push:
branches:
- dev
2020-04-01 00:57:46 +08:00
- releases/v3-test
2020-01-14 23:19:04 +08:00
jobs:
# Deploys using checkout@v1 with an ACCESS_TOKEN.
integration-checkout-v1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2020-04-01 00:10:36 +08:00
BRANCH: gh-pages-test
2020-01-14 23:19:04 +08:00
FOLDER: integration
BASE_BRANCH: dev
2020-04-30 20:49:28 +08:00
TARGET_FOLDER: cat/montezuma
GIT_CONFIG_NAME: Montezuma
GIT_CONFIG_EMAIL: montezuma@jamesiv.es
2020-01-14 23:19:04 +08:00
2020-04-01 00:08:23 +08:00
- name: Cleanup Generated Branch
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
branches: gh-pages-test
2020-04-01 00:08:23 +08:00
2020-01-14 23:19:04 +08:00
# Deploys using checkout@v2 with a GITHUB_TOKEN.
integration-checkout-v2:
needs: integration-checkout-v1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
2020-01-19 03:51:53 +08:00
with:
persist-credentials: false
2020-01-14 23:19:04 +08:00
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
BRANCH: gh-pages-test
2020-01-14 23:19:04 +08:00
FOLDER: integration
BASE_BRANCH: dev
2020-04-30 20:49:28 +08:00
TARGET_FOLDER: cat/montezuma2
2020-01-14 23:19:04 +08:00
2020-04-01 00:08:23 +08:00
- name: Cleanup Generated Branch
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
branches: gh-pages-test
2020-04-01 00:08:23 +08:00
2020-01-14 23:19:04 +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 03:51:53 +08:00
with:
persist-credentials: false
2020-01-14 23:19:04 +08:00
- name: Install rsync
run: |
apt-get update && apt-get install -y rsync
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
BRANCH: gh-pages-test
2020-01-14 23:19:04 +08:00
FOLDER: integration
BASE_BRANCH: dev
2020-04-30 20:49:28 +08:00
TARGET_FOLDER: cat/montezuma2
2020-01-14 23:19:04 +08:00
2020-04-01 00:08:23 +08:00
- name: Cleanup Generated Branch
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
branches: gh-pages-test
2020-04-01 00:08:23 +08:00
2020-03-31 21:54:49 +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
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
SSH: true
2020-04-01 00:10:36 +08:00
BRANCH: gh-pages-test
FOLDER: integration
BASE_BRANCH: dev
2020-04-30 20:49:28 +08:00
TARGET_FOLDER: cat/montezuma3
2020-04-01 00:08:23 +08:00
- name: Cleanup Generated Branch
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
branches: gh-pages-test
2020-04-01 00:08:23 +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
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
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
SSH: true
2020-04-01 00:10:36 +08:00
BRANCH: gh-pages-test
FOLDER: integration
BASE_BRANCH: dev
2020-04-30 20:49:28 +08:00
TARGET_FOLDER: cat/montezuma4
2020-04-01 00:08:23 +08:00
- name: Cleanup Generated Branch
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-04-01 00:10:36 +08:00
branches: gh-pages-test
2020-04-01 00:08:23 +08:00
2020-04-01 00:57:46 +08:00
# Deploys using the CLEAN option toggled.
2020-01-14 23:19:04 +08:00
integration-clean:
needs: [integration-checkout-v1, integration-checkout-v2, integration-container, integration-ssh, integration-env]
2020-01-14 23:19:04 +08:00
runs-on: ubuntu-latest
steps:
- name: Checkout
2020-01-19 03:51:53 +08:00
uses: actions/checkout@v2
with:
persist-credentials: false
2020-01-14 23:19:04 +08:00
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2020-04-01 00:10:36 +08:00
BRANCH: gh-pages-test
2020-01-14 23:19:04 +08:00
FOLDER: integration
BASE_BRANCH: dev
CLEAN: true
2020-03-31 21:54:49 +08:00
# Deploys to a branch that doesn't exist with SINGLE_COMMIT.
2020-01-14 23:19:04 +08:00
integration-branch-creation:
runs-on: ubuntu-latest
steps:
- name: Checkout
2020-01-19 03:51:53 +08:00
uses: actions/checkout@v2
with:
persist-credentials: false
2020-01-14 23:19:04 +08:00
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3-test
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2020-03-31 21:54:49 +08:00
BRANCH: integration-test-delete-beta
2020-01-14 23:19:04 +08:00
FOLDER: integration
BASE_BRANCH: dev
SINGLE_COMMIT: true
2020-01-14 23:19:04 +08:00
- name: Cleanup Generated Branch
uses: dawidd6/action-delete-branch@v2.0.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2020-03-31 21:54:49 +08:00
branches: integration-test-delete-beta