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

Create Docker container to Publish publish notes automatically #430

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

spartacus04
Copy link

@spartacus04 spartacus04 commented May 10, 2024

Goals

  • Create a docker container that automatically builds the files headlessly
  • Allow container to export with last settings
  • Allow container to export with custom settings
  • Setup a github action to use the container

What I did so far

  • Updated all dependencies
  • Created a Docker container that builds the plugin and exports the vault with latest files (supports mounting a custom config file)
  • Tweaked the plugin to allow this
  • Tweak publish github actions to build the Docker container and publish it to DockerHub (Need to setup DOCKER_USERNAME and DOCKER_TOKEN inside repository secrets)
  • Created a github action to allow automation of publishing

Related to

#49 #140

- Update all dependencies except for @types/node
- Tweak esbuild to work with new version
- Begin to setup docker
- Fix peer dependency for eslint
- Add a method in the class to export to a set path
- Setup github action for publishing docker image
Reverted esbuild update
@spartacus04
Copy link
Author

Almost ready, the docker container is exporting to HTML successfully, just need to finish the github action and test it a bit, then it'll be ready to be merged.

@KosmosisDire
Copy link
Owner

Amazing! Thank you so much for your work on this!

@spartacus04 spartacus04 marked this pull request as ready for review May 23, 2024 07:54
@spartacus04
Copy link
Author

spartacus04 commented May 23, 2024

Just finished this, just remember to setup the DOCKER_USERNAME and DOCKER_TOKEN secrets inside the repository settings. Once a new tag is published the github action will start working correctly.

Here's an example on how the github action works:

      - name: Obsidian Webpage Export Action
        id: obsidian-webpage-export
        uses: KosmosisDire/obsidian-webpage-export
        with:
          vault: ./ #defaults to .
          version: latest #optional
          config: config.json #optional

      - run: |
          echo "The export is available at ${{ steps.obsidian-webpage-export.outputs.output }}"

I would advise creating a new tag both for the stable and beta release.

@KosmosisDire
Copy link
Owner

Awesome, this is amazing. I am pretty busy atm but I'll try and take a look at getting this set up today

@KosmosisDire
Copy link
Owner

Hey, I am trying to test this outside of GitHub actions and it seems to all work but I can't get it to actually export specific files. I think the config.json is not being respected somehow, I assume the config.json is meant to be the settings (data.json) from the plugin. When I export I simply get an export as if no files were selected for export. I just get the lib folder and no .html files. Is the config.json being copied into the plugin directory correctly?

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

Successfully merging this pull request may close these issues.

None yet

2 participants