Skip to content

Added Temporary Docs #1

Added Temporary Docs

Added Temporary Docs #1

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
issues: write
discussions: write
packages: write
pages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: lilia
- uses: leafo/[email protected]
with:
luaVersion: "5.2"
- uses: leafo/[email protected]
- name: Pull gluacheck
uses: actions/checkout@v2
with:
repository: impulsh/gluacheck
path: luacheck
- name: Build gluacheck
working-directory: luacheck
run: luarocks make
- name: Lint
working-directory: lilia
run: luacheck . --no-redefined
--no-global --no-self
--no-max-line-length --no-max-code-line-length
--no-max-string-line-length --no-max-comment-line-length
--no-max-cyclomatic-complexity
docs:
runs-on: ubuntu-latest
needs: linter
steps:
- uses: actions/checkout@v2
with:
path: lilia
- uses: leafo/[email protected]
with:
luaVersion: "5.2"
- uses: leafo/[email protected]
- name: Pull LDoc
uses: actions/checkout@v2
with:
repository: bleonheart/LDoc
path: ldoc
- name: Build LDoc
working-directory: ldoc
run: luarocks make
- name: Build docs
working-directory: lilia
run: ldoc . --fatalwarnings
- name: Copy assets
working-directory: lilia
run: |
cp -v docs/css/* docs/html
cp -v docs/js/* docs/html
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'LiliaFramework/Lilia' && success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: lilia/docs/html
sync:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'LiliaFramework/Lilia' && success()
runs-on: ubuntu-latest
needs: docs
steps:
- name: Checkout source repository
uses: actions/checkout@v2
- name: Push to destination repository
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
git clone https://${{ env.ORG_NAME }}:${{ secrets.LiliaGitSecret }}@github.com/${{ env.ORG_NAME }}/LiliaFramework.github.io.git liliagit
cd liliagit
git remote add ${{ env.ORIGINAL_REPO_NAME }} https://${{ env.ORG_NAME }}:${{ secrets.LiliaGitSecret }}@github.com/${{ env.ORG_NAME }}/${{ env.ORIGINAL_REPO_NAME }}.git
git remote update
git merge ${{ env.ORIGINAL_REPO_NAME }}/gh-pages --allow-unrelated-histories gh-pages
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.LiliaGitSecret }}
ORIGINAL_REPO_NAME: ${{ github.event.repository.name }}
ORG_NAME: LiliaFramework