mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Move contents of deploy-userguide to deploy-framework
This commit is contained in:
parent
7f95f7d522
commit
cd4bff31d1
53
.github/workflows/deploy-framework.yml
vendored
53
.github/workflows/deploy-framework.yml
vendored
@ -122,3 +122,56 @@ jobs:
|
||||
name: release.data.name,
|
||||
body: release.data.body
|
||||
})
|
||||
|
||||
userguide:
|
||||
name: Deploy to userguide
|
||||
if: github.repository == 'codeigniter4/CodeIgniter4'
|
||||
runs-on: ubuntu-22.04
|
||||
needs: check-version
|
||||
|
||||
steps:
|
||||
- name: Identify
|
||||
run: |
|
||||
git config --global user.email "action@github.com"
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: source
|
||||
|
||||
- name: Checkout target
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: codeigniter4/userguide
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
path: userguide
|
||||
|
||||
- name: Install Sphinx
|
||||
run: |
|
||||
sudo apt install python3-sphinx
|
||||
sudo pip3 install sphinxcontrib-phpdomain
|
||||
sudo pip3 install sphinx_rtd_theme
|
||||
|
||||
- name: Chmod
|
||||
run: chmod +x ./source/.github/scripts/deploy-userguide
|
||||
|
||||
- name: Deploy
|
||||
run: ./source/.github/scripts/deploy-userguide ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/userguide ${GITHUB_REF##*/}
|
||||
|
||||
- name: Release
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.ACCESS_TOKEN}}
|
||||
script: |
|
||||
const release = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
})
|
||||
github.rest.repos.createRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: 'userguide',
|
||||
tag_name: release.data.tag_name,
|
||||
name: release.data.name,
|
||||
body: release.data.body
|
||||
})
|
||||
|
59
.github/workflows/deploy-userguide.yml
vendored
59
.github/workflows/deploy-userguide.yml
vendored
@ -1,59 +0,0 @@
|
||||
# When a new Release is created, deploy relevant
|
||||
# files to each of the generated repos.
|
||||
name: Deploy User Guide
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
framework:
|
||||
name: Deploy to userguide
|
||||
if: (github.repository == 'codeigniter4/CodeIgniter4')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Identify
|
||||
run: |
|
||||
git config --global user.email "action@github.com"
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: source
|
||||
|
||||
- name: Checkout target
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: codeigniter4/userguide
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
path: userguide
|
||||
|
||||
- name: Install Sphinx
|
||||
run: |
|
||||
sudo apt install python3-sphinx
|
||||
sudo pip3 install sphinxcontrib-phpdomain
|
||||
sudo pip3 install sphinx_rtd_theme
|
||||
|
||||
- name: Chmod
|
||||
run: chmod +x ./source/.github/scripts/deploy-userguide
|
||||
|
||||
- name: Deploy
|
||||
run: ./source/.github/scripts/deploy-userguide ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/userguide ${GITHUB_REF##*/}
|
||||
|
||||
- name: Release
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.ACCESS_TOKEN}}
|
||||
script: |
|
||||
const release = await github.rest.repos.getLatestRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo
|
||||
})
|
||||
github.rest.repos.createRelease({
|
||||
owner: context.repo.owner,
|
||||
repo: 'userguide',
|
||||
tag_name: release.data.tag_name,
|
||||
name: release.data.name,
|
||||
body: release.data.body
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user