Skip to content

Commit

Permalink
ci: test deployment job
Browse files Browse the repository at this point in the history
testing gha
  • Loading branch information
wpiet committed Jul 31, 2024
1 parent ca1f923 commit 80e1850
Showing 1 changed file with 35 additions and 8 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,60 @@
#

name: Deploy Site
on: pull_request
on: push
# push:
# branches:
# - 'master'
# schedule:
# - cron: '13 * * * *'

jobs:
deploy:
name: Deploy Site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master

- name: Install Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y doxygen tzdata
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Setup project
shell: bash
- name: Setup Project
run: |
cd ..
git clone https://github.com/apache/mynewt-documentation
git clone https://github.com/apache/mynewt-core
git clone https://github.com/apache/mynewt-nimble
git clone https://github.com/apache/mynewt-newt
git clone https://github.com/apache/mynewt-newtmgr
cd mynewt-site
./build.py
./deploy.sh
git diff --name-only
- name: Build Site
run: ./build.py

- name: Fetch Deployment Branch
run: |
git fetch origin asf-site:asf-site
- name: Deploy Site
run: ./deploy.sh build

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: asf-site update
base: asf-site
branch: site-update
title: "Deploy site"
body: |
Deploy site:
- Builds the static site from `master` branch
- Pushes the changes to `asf-site`
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request

0 comments on commit 80e1850

Please sign in to comment.