fix: testando publicação #35
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: Publish Blog to Heroku | |
on: push | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
deployments: write # needed for Cloudflare | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.X' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
cache: 'pip' | |
- run: pip install -r requirements.txt --prefer-binary | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Render Quarto Project | |
uses: quarto-dev/quarto-actions/render@v2 | |
- name: Create Deploy folder | |
run: mkdir _deploy | |
shell: sh | |
- name: Create content folder | |
run: mkdir _deploy/content | |
shell: sh | |
- name: Copy content to content folder | |
run: mv _site/* _deploy/content | |
shell: sh | |
- name: Copy site template | |
run: cp library/site_template/* _deploy | |
shell: sh | |
- name: Copy .gitignore | |
run: cp library/site_template/.gitignore _deploy | |
shell: sh | |
- name: Git unset | |
run: git config --unset-all http.https://github.com/.extraheader | |
shell: sh | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.GH_PAT }} | |
with: | |
source-directory: '_deploy' | |
destination-github-username: 'wvcode' | |
destination-repository-name: 'blog-conteudo' | |
user-email: [email protected] | |
target-branch: main |