Skip to content

Commit

Permalink
added github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
filipandren committed Apr 16, 2024
1 parent 88712b8 commit b64e323
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
74 changes: 74 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
repository_dispatch:
events:
[ release_event ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-22.04

# 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
- uses: actions/checkout@v2
with:
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

# - name: Download Bridge
# run: |
# ./get_latest_xml2md.sh

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
- run: go version

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.120.4'
extended: true

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '20.x'
- run: npm install

# - name: Install pandoc
# run: sudo apt-get install pandoc

# - name: Cache dependencies
# uses: actions/cache@v1
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-

- name: Build
run: hugo --minify

# - run: ls -l ./public

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# keep_files: true
publish_branch: gh-pages
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"devDependencies": {
"autoprefixer": "^10.4.14",
"cross-env": "^7.0.3",
"hugo-extended": "0.120.4",
"postcss-cli": "^10.1.0"
}
}

0 comments on commit b64e323

Please sign in to comment.