mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
add new action
This commit is contained in:
parent
b7a22eca07
commit
aa222bd2cb
36
.github/workflows/lctt-article-badge.yml
vendored
Normal file
36
.github/workflows/lctt-article-badge.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: LCTT Article Badge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TRAVIS_REPO_SLUG: ${{ github.repository }}
|
||||
TRAVIS_BRANCH: master
|
||||
TRAVIS_PULL_REQUEST: ${{ github.event.number }}
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
steps:
|
||||
- name: Set ENV variables
|
||||
run: |
|
||||
echo "::set-env name=TRAVIS_BRANCH::${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}"
|
||||
echo "::set-env name=TRAVIS_EVENT_TYPE::$(if [ "schedule" == "${{ github.event_name }}" ]; then echo "cron"; else echo "${{ github.event_name }}"; fi)"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: checkout old pages branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lctt/translateproject
|
||||
path: build
|
||||
ref: gh-pages
|
||||
- name: remove pages .git
|
||||
run: rm -rf ./build/.git
|
||||
- name: run badge
|
||||
run: sh ./scripts/badge.sh;
|
||||
- uses: crazy-max/ghaction-github-pages@v2.2.0
|
||||
with:
|
||||
build_dir: ./build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
37
.github/workflows/lctt-article-status.yml
vendored
Normal file
37
.github/workflows/lctt-article-status.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: LCTT Article Status
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/30 * * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TRAVIS_REPO_SLUG: ${{ github.repository }}
|
||||
TRAVIS_BRANCH: master
|
||||
TRAVIS_PULL_REQUEST: ${{ github.event.number }}
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
steps:
|
||||
- name: Set ENV variables
|
||||
run: |
|
||||
echo "::set-env name=TRAVIS_BRANCH::${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}"
|
||||
echo "::set-env name=TRAVIS_EVENT_TYPE::$(if [ "schedule" == "${{ github.event_name }}" ]; then echo "cron"; else echo "${{ github.event_name }}"; fi)"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: checkout old pages branch
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lctt/translateproject
|
||||
path: build
|
||||
ref: gh-pages
|
||||
- name: remove pages .git
|
||||
run: rm -rf ./build/.git
|
||||
- name: run status
|
||||
run: sh ./scripts/status.sh;
|
||||
- uses: crazy-max/ghaction-github-pages@v2.2.0
|
||||
with:
|
||||
build_dir: ./build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in New Issue
Block a user