Skip to content

Commit

Permalink
ci: use github token
Browse files Browse the repository at this point in the history
  • Loading branch information
hanadi92 authored and Hanadi Tamimi committed Dec 24, 2023
1 parent 7ca2559 commit 98698aa
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/pelican-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: Pelican Deploy

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
Expand All @@ -13,36 +9,32 @@ on:
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Change this to the version of Python you want to use
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pelican # markdown typogrify # Add any other dependencies your site needs
pip install pelican
- name: Generate site
run: |
pelican content # Replace "content" with the directory that contains your site's content
# Add any other Pelican commands you need to generate the site
pelican content
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.YOUR_SECRENT_NAME }}
publish_dir: output # Replace "output" with the directory that contains your site's generated output
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: output

0 comments on commit 98698aa

Please sign in to comment.