Add hint to the presign documentation how to upload a file (#1673) #1169
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build website | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'docs/**' | |
- 'website/**' | |
- 'couscous.yml' | |
- '.github/workflows/website.yml' | |
jobs: | |
build: | |
if: github.repository == 'async-aws/aws' | |
name: Generate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
path: 'source' | |
- name: Checkout Website repo | |
run: | | |
git clone --branch master https://${{ secrets.BOT_GITHUB_TOKEN }}:[email protected]/async-aws/website output | |
- name: Download Couscous Phar | |
run: | | |
curl -OSL https://raw.githubusercontent.com/Nyholm/Couscous/twig-production/couscous.phar | |
chmod +x couscous.phar | |
- name: Generate website | |
run: | | |
echo "::group::Couscous" | |
./couscous.phar generate --target output source | |
echo "::endgroup::" | |
echo "::group::Post process" | |
cd source/website && npm run post-process `pwd`/../../output | |
echo "::endgroup::" | |
- name: Commit & push the new files | |
run: | | |
echo "::group::git status" | |
cd output | |
git status | |
echo "::endgroup::" | |
git add -N . | |
if [[ $(git diff --numstat | wc -l) -eq 0 ]]; then | |
echo "No changes found. Exiting." | |
exit 0; | |
fi | |
git config --local user.email "[email protected]" | |
git config --local user.name "AsyncAws Bot" | |
echo "::group::git push" | |
git add . | |
git commit -m "Update website from commit async-aws/aws@${{ github.sha }}" | |
git push | |
echo "::endgroup::" |