Open laeubi opened 3 years ago
I have created a basic action now: https://github.com/cucumber/cucumber-eclipse/actions
I think the first steps would be:
@mattwynne I have tried to setup multiple branches in https://github.com/cucumber/cucumber-eclipse/blob/main/.github/workflows/maven.yml is this the right way or should I place a maven.yml in each branch that should be build?
@qvdk FYI, another action required would be to disable the travis-ci jobs for this, is this simply deleting the .travis.yml file?
Yes I confirm
is this the right way or should I place a maven.yml in each branch that should be build?
As I understand it, if you have a workflow like this in your main
branch, it will run the workflow if you push to any of the branches listed in the on.push.branches
array.
@mattwynne I have created:
cucumber.eclipse.p2updatesite/target/repository/
that should be placed in the gh-pages directorycan you give a hint how this is bet archived, given that only that folder must always be updated by the workflow?
I think manually it would be something like the following steps:
but maybe there are smarter ways than doing everything step by step with shell commands?
@laeubi do you mean that, once the mvn -B
command has run, there's a directory cucumber.eclipse.p2updatesite/target/repository/
that you want copied to the right folder in the gh-pages
branch?
If so, we're on the right lines. I think you need an action something like this:
- run: |
cp -R cucumber.eclipse.p2updatesite/target/repository/ {{ runner.temp }}/output
git checkout gh-pages
rm -rf update-site/{{ github.ref }}
cp -R {{ runner.temp }}/output update-site/{{ github.ref }}
git add --update .
git config --global user.email "github-actions@example.com"
git config --global user.name "GitHub Actions"
git commit -m "Add latest update-site for version {{ github.ref }}"
git push
Can you give that a try?
You might need to change the - uses: actions/checkout@v2
step to make sure you've pulled down the gh-actions
branch as well as the current branch. Or maybe you just need a git fetch
before the git checkout gh-pages
line.
@mattwynne thanks, thats correct the directory contains the data of the update-site. I'll give it a try.
@mattwynne I have updated the code but it seems the add does not work and complains about nothing was added. Can you take a look if I'm missing something?
I have just modfied your aproach a bit by checkout both branches in different directories, and currently do not delete any old data.
I think I found the issue, I simply removed the --update
flag from the git add as it seems to only work if there is already a versioned file with this name (and new files are thus never added..)
For the v.0 and v1. the update site is there and automatically updated:
The new update-site hosting containing all versions will be https://cucumber.github.io/cucumber-eclipse/update-site/
Currently there are
that looks a bit nicer, @qvdk @mattwynne can anyone help migrating the more modern design to the https://cucumber.github.io/cucumber-eclipse/update-site/ ?
If that's done we should remove the content from the other sites and place a link to the new site there.
This is how the update-site currently looks like:
The current main branch is deployed now to https://github.com/cucumber/cucumber-eclipse/tree/gh-pages/update-site/main and available as https://cucumber.github.io/cucumber-eclipse/update-site/main/ for usage inside eclipse.
The main is not included in the composite, so users will need to add this explicitly if desired as an extra update-site.
We are currently using Travis CI, but the goal would be to migrate this to gtihub actions.
As part of this migration, the deployment should be changed so that different branches are deployed to different folders (instead of different gh-pages) so we can have a better user-experience.
The structure should be as follows:
where each branch is a different build.