Skip to content

Merge pull request #50 from Shaikh-Ubaid/add_link_to_dev_lpython_org #92

Merge pull request #50 from Shaikh-Ubaid/add_link_to_dev_lpython_org

Merge pull request #50 from Shaikh-Ubaid/add_link_to_dev_lpython_org #92

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Main
uses: actions/checkout@v3
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
# extended: true
- name: Show Hugo version
shell: bash -l {0}
run: hugo version
- name: Clone the submodule theme
shell: bash -l {0}
run: git clone https://github.com/halogenica/beautifulhugo themes/beautifulhugo --depth=1
- name: Build Site
shell: bash -l {0}
run: hugo
- name: GIT Setup Config
shell: bash -l {0}
run: |
git config user.email "noreply@deploy"
git config user.name "Deploy"
- name: GIT Checkout gh-pages
shell: bash -l {0}
run: |
cp public/ ../public -r
git reset --hard
git fetch origin
git checkout gh-pages
- name: Misc Steps
shell: bash -l {0}
run: |
rm -rf *
mv ../public/* .
echo "lpython.org" > CNAME
- name: GIT Add and Commit
shell: bash -l {0}
run: |
git add .
COMMIT_MESSAGE="Deploying on $(date "+%Y-%m-%d %H:%M:%S")"
git commit --allow-empty -m "${COMMIT_MESSAGE}"
- name: GIT Deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: git push origin gh-pages