chore: add collectstatic #19
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: Push to PWS | |
on: | |
push: | |
branches: [ main, master ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ main, master ] | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Check PWS remote, pull, merge, and push | |
env: | |
PWS_URL: ${{ secrets.PWS_URL }} | |
run: | | |
echo "Creating temporary branch" | |
git checkout -b tmp | |
# Push to master branch and capture the output | |
push_output=$(git push $PWS_URL tmp:master 2>&1) | |
if [[ $? -ne 0 ]]; then | |
echo "Push failed with output: $push_output" | |
echo "Error: Unable to push changes. Please check the error message above and resolve any conflicts manually." | |
exit 1 | |
fi | |
echo "Push successful with output: $push_output" |