diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7cbde46 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: git + run: | + git clone --depth 1 "https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}" . + git config user.name "GitHub Action" + git config user.email "action@github.com" + git log -1 --format="%H" + - name: test + run: make test + - name: gh-pages + run: | + git checkout --orphan gh-pages && git reset + make generate-gh-pages + git add -f docs/ && git commit -m deploy + git push -f origin gh-pages + - name: notify + if: ${{ failure() }} + run: | + text="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} failed" + curl --silent --output /dev/null ${{secrets.TELEGRAM_URL}} -d "chat_id=${{secrets.TELEGRAM_CHAT_ID}}&text=${text}" diff --git a/.gitignore b/.gitignore index 61cb813..9d92c3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/gh-pages/ +/docs/ /go-org /fuzz /org-fuzz.zip \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 002f045..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -go: "1.x" -script: - - make test - - make generate-gh-pages -deploy: - provider: pages - github-token: $GITHUB_TOKEN # From travis-ci.org repository settings - local-dir: gh-pages - target-branch: gh-pages - skip-cleanup: true - verbose: true - on: - branch: master diff --git a/README.org b/README.org index 607eda7..c47031e 100644 --- a/README.org +++ b/README.org @@ -1,4 +1,4 @@ -* go-org [[https://travis-ci.org/niklasfasching/go-org.svg?branch=master]] +* go-org An Org mode parser and static site generator in go. Take a look at github pages - for [[https://niklasfasching.github.io/go-org/][org to html conversion]] examples diff --git a/etc/generate-gh-pages b/etc/generate-gh-pages index f474c07..ca31956 100755 --- a/etc/generate-gh-pages +++ b/etc/generate-gh-pages @@ -124,10 +124,10 @@ convert=" " -mkdir -p gh-pages +mkdir -p docs go get github.com/chaseadamsio/goorgeous -cp etc/_goorgeous.go gh-pages/goorgeous.go -go build -o gh-pages/goorgeous gh-pages/goorgeous.go +cp etc/_goorgeous.go docs/goorgeous.go +go build -o docs/goorgeous docs/goorgeous.go go_org_vs_goorgeous_examples="