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 option to prevent the action from checking out to the source repo #6

Open
tlylt opened this issue May 4, 2022 · 0 comments
Open

Comments

@tlylt
Copy link
Collaborator

tlylt commented May 4, 2022

Currently, this action will checkout the source repo that invokes it, and do the build and deployment.

However, if there is any on-the-fly processing that developers wish to perform in the CI pipeline before invoking this action, the modification may not propagate into this action. For example, the author wishes to generate a source file test.md on the fly and have it included in the build, he cannot do so as this action starts off by checking out the source repository which does not contain the CI generated test.md

Solution:

  • A simple fix is to provide an option and relevant explanation to let the author checkout his/her repository via
  steps:
    - name: Checkout source repo
      uses: actions/checkout@v3
      with:
        path: curr-repo

Then below it, invokes this action with:

      - name: Build & Deploy MarkBind site
        uses: MarkBind/markbind-action@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          version: '3.1.1'
          checkout: false

The author has to check out the source repo into the path curr-repo as this action was structured to separate it from the MarkBind-related dependencies. This may potentially pose some inconvenience to some authors. So a less important improvement is to make it such that the source files can remain in the root folder, by making adjustments to how this action is structured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant