From 98698aa396a480fcd41128ec5ce1d48f4fb4d865 Mon Sep 17 00:00:00 2001 From: Hanadi Date: Sun, 24 Dec 2023 09:43:03 +0100 Subject: [PATCH] ci: use github token --- .github/workflows/pelican-deploy.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pelican-deploy.yml b/.github/workflows/pelican-deploy.yml index 288247a..349cd05 100644 --- a/.github/workflows/pelican-deploy.yml +++ b/.github/workflows/pelican-deploy.yml @@ -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: @@ -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