mirror of
https://codeberg.org/forgejo/docs.git
synced 2024-11-21 17:36:59 -05:00
de971ac0e2
TODO: - [x] comment out the `git push` once the website has submodules merged in Fixes: https://codeberg.org/forgejo/docs/issues/8 Additionally * Upgrade to node:20 * Exclude the README.md when copying to the preview * Allow forgejo-website to push to main on website ![image](/attachments/14f4f38f-fdb8-4ca7-9aee-d9b7e108d71e) Preview: https://forgejo.codeberg.page/@docs_pull_9/ Reviewed-on: https://codeberg.org/forgejo/docs/pulls/9 Reviewed-by: Loïc Dachary <dachary@noreply.codeberg.org> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
28 lines
721 B
YAML
28 lines
721 B
YAML
name: push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'next'
|
|
- 'v1.21'
|
|
- 'v1.20'
|
|
- 'v1.19'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: docker
|
|
steps:
|
|
- name: update the website submodules
|
|
if: ${{ secrets.WEBSITETOKEN != '' }}
|
|
run: |
|
|
git clone --recursive https://forgejo-website:${{ secrets.WEBSITETOKEN }}@codeberg.org/forgejo/website
|
|
cd website
|
|
git submodule update --remote
|
|
git config user.email "ci@forgejo.org" ; git config user.name "forgejo-website"
|
|
git add .
|
|
if git diff-index --quiet HEAD ; then
|
|
echo Nothing changed, not pushing
|
|
else
|
|
git commit -m 'publish' -a
|
|
git push
|
|
fi
|