Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to publish Wiki pages #119

Closed
toby-thanathip opened this issue Aug 26, 2021 · 7 comments · Fixed by #120
Closed

Add workflow to publish Wiki pages #119

toby-thanathip opened this issue Aug 26, 2021 · 7 comments · Fixed by #120
Assignees
Milestone

Comments

@toby-thanathip
Copy link
Contributor

toby-thanathip commented Aug 26, 2021

Why

We want to start adding more to our Wiki section, but GitHub doesn't support creating pull requests for Wiki pages by default. As we want our Wiki pages to be reviewed before being published, we can make use of this GitHub Action.

Basically the idea is as following:

  • Add workflow for publishing Wiki pages (Ex: wiki.yml)
  • Add markdown files that represents the Wiki content (Ex: Campaign.md)
  • Set environment variables (Ex: GH_PAT)

When merging to main, then we publish all markdown files to the Wiki section

image

name: Publish wiki

on:
  push:
    branches:
      - main

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: ${{ github.ref }}
    - uses: Decathlon/[email protected]
      env:
        GH_PAT: ${{ secrets.WIKI_ACTION_TOKEN }}
        ACTION_MAIL: [email protected]
        ACTION_NAME: team-nimblehq
        OWNER: nimblehq
        REPO_NAME: android-templates
        MD_FOLDER: .github/wiki
        WIKI_PUSH_MESSAGE: Push from Github action

Read more: slides

Who Benefits?

@nimblehq/android-chapter

@toby-thanathip toby-thanathip self-assigned this Aug 26, 2021
@toby-thanathip toby-thanathip added this to the 3.1.0 milestone Aug 26, 2021
@toby-thanathip
Copy link
Contributor Author

@lydiasama What do you think? 🙏

@luongvo
Copy link
Member

luongvo commented Aug 26, 2021

LGTM @Tuubz 👍

@toby-thanathip
Copy link
Contributor Author

toby-thanathip commented Aug 27, 2021

Sadly this GitHub action has some limitations:

  • No support for removing Wiki pages with pull requests: issue
  • We can't reference images with a relative path

So I'm planning to merge this and this to a solution of our own 🚀

@lydiasama
Copy link
Contributor

lydiasama commented Aug 27, 2021

So we will show the wiki after we do release, not every merge that pull request to develop, right? Because we trigger the action once merge to main. @Tuubz

@toby-thanathip
Copy link
Contributor Author

toby-thanathip commented Aug 27, 2021

@lydiasama Oh, I thought we were only making use of main

Looking at the current PR's, they all have main set as the target branch

Please correct me if I'm wrong 🙇


Anyhow, we can choose on what branch it should trigger the action 🚀

@toby-thanathip
Copy link
Contributor Author

@lydiasama Ok, I found the thread!

@toby-thanathip
Copy link
Contributor Author

So we will show the wiki after we do release, not every merge that pull request to develop, right?

Sounds good to me, let's trigger it on main branch only 🚀

@lydiasama lydiasama modified the milestones: 3.1.0, 3.2.0 Aug 30, 2021
@toby-thanathip toby-thanathip linked a pull request Aug 30, 2021 that will close this issue
lydiasama added a commit that referenced this issue Sep 10, 2021
…ish-docs-to-wiki

[#119] Add action to publish docs to Wiki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants